package cn.iocoder.yudao.boot.common.constant;

import cn.iocoder.yudao.boot.common.exception.ErrorCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter
@AllArgsConstructor
public enum ServiceErrorCode implements ErrorCode {
    INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "InternalServerError", "服务错误", BaseErrorCode.SERVIE_ERROR),
    NOT_IMPLEMENTED(HttpStatus.INTERNAL_SERVER_ERROR, "NotImplemented", "功能未实现/未开启", BaseErrorCode.SERVIE_ERROR),
    BUSINESS_RULE_VIOLATION(HttpStatus.INTERNAL_SERVER_ERROR, "BusinessRuleViolation", "业务规则验证失败", BaseErrorCode.SERVIE_ERROR),
    DATA_DEPENDENCY_MISSING(HttpStatus.INTERNAL_SERVER_ERROR, "DataDependencyMissing", "数据依赖缺失", BaseErrorCode.SERVIE_ERROR),
    SERVICE_CALL_TIMEOUT(HttpStatus.INTERNAL_SERVER_ERROR, "ServiceCallTimeout", "服务调用超时", BaseErrorCode.SERVIE_ERROR);
    ;

    private HttpStatus httpStatus;
    private final String code;
    private final String msg;
    private final ErrorCode parent;
}
